package cn.itsource.controller.feign;

import cn.itsource.domain.user.User;
import cn.itsource.feign.user.UserFeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.List;

@RestController
public class UserFeignController implements UserFeignClient {

    public User findOne(@PathVariable Long id){
        return new User(id,"zs");
    }

    @Override
    public List<User> findAll() {
        return Arrays.asList(new User(1L,"张三"),new User(2L,"李四"));

    }

}
